using UnityEngine;
using System.Collections;

public class PlayerBudgetPoints : MonoBehaviour {
	
	GameObject playerBudgetPointsObject;
	Player playerScript;
	string playerBudgetPointsText;
	Component playerBudgetPoints;
	
	
	void Awake()
	{
		playerBudgetPointsObject = GameObject.Find("BudgetPointsHUD");
		playerBudgetPoints = playerBudgetPointsObject.guiText;
		playerScript = GetComponent<Player>();
	}
	
	// Use this for initialization
	void Start () {
		playerBudgetPointsText = "Budget Points: " + playerScript.getBudgetPoints();
		playerBudgetPoints.guiText.text = playerBudgetPointsText;
	}
	
	// Update is called once per frame
	void Update () {
		playerBudgetPointsText = "Budget Points: " + playerScript.getBudgetPoints();
		playerBudgetPoints.guiText.text = playerBudgetPointsText;		
	}
}
